// ---------------------------------------------------------------------------------------------------------------------
//   Copyright (c) SRT Solutions 2009. All rights reserved.
// ---------------------------------------------------------------------------------------------------------------------
using System;

namespace SRTSolutions.Elevate
{
    /// <summary>
    /// An EventArgs implementation with 1 property of type T for EventData.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class EventArgs<T> : System.EventArgs
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="EventArgs&lt;T&gt;"/> class.
        /// </summary>
        public EventArgs()
        {

        }
        /// <summary>
        /// Initializes a new instance of the <see cref="EventArgs&lt;T&gt;"/> class.
        /// </summary>
        /// <param name="eventData">The EventData.</param>
        public EventArgs(T eventData)
        {
            EventData = eventData;
        }
        /// <summary>
        /// Gets or sets the argument.
        /// </summary>
        /// <value>The argument.</value>
        public T EventData { get; set; }

        /// <summary>
        /// Creates the specified event data.
        /// </summary>
        /// <typeparam name="T1">The type of the data.</typeparam>
        /// <param name="eventData">The event data.</param>
        /// <returns></returns>
        public static EventArgs<T1> Create<T1>(T1 eventData)
        {
            return new EventArgs<T1>(eventData);
        }
    }
}
